From fb8972415db9d273b9cc176266e6e7207f93280a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 3 Sep 2025 14:45:32 +0200 Subject: [PATCH] bootstrap: disarm tests that requires git context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler Gbp-Pq: Topic build Gbp-Pq: Name bootstrap-disarm-llvm-config-test-that-requires-git.patch --- src/bootstrap/src/core/builder/tests.rs | 3 +++ src/bootstrap/src/core/config/tests.rs | 5 +++++ src/bootstrap/src/utils/helpers/tests.rs | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index e0eb38d04a..c6f0748d05 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -430,6 +430,9 @@ fn test_prebuilt_llvm_config_path_resolution() { .join(exe("llvm-config", builder.config.host_target)); assert_eq!(expected, actual); + // Debian: if-unchanged fails for non-git sources + return; + let config = configure( r#" [llvm] diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs index e19604d4ab..0bca66ff4c 100644 --- a/src/bootstrap/src/core/config/tests.rs +++ b/src/bootstrap/src/core/config/tests.rs @@ -37,6 +37,8 @@ fn download_ci_llvm() { let config = TestCtx::new().config("check").create_config(); assert!(!config.llvm_from_ci); + // Debian: if-unchanged doesn't work in non-git context + return; // this doesn't make sense, as we are overriding it later. let if_unchanged_config = TestCtx::new() .config("check") @@ -422,6 +424,7 @@ fn check_rustc_if_unchanged_paths() { .collect(); for p in normalised_allowed_paths { + if p == "triagebot.toml" { continue }; assert!(config.src.join(p).exists(), "{p} doesn't exist."); } } @@ -490,6 +493,8 @@ fn test_exclude() { #[test] fn test_ci_flag() { + // Debian: if-unchanged doesn't work in non-git context + return; let config = TestCtx::new().config("check").arg("--ci").arg("false").create_config(); assert!(!config.is_running_on_ci); diff --git a/src/bootstrap/src/utils/helpers/tests.rs b/src/bootstrap/src/utils/helpers/tests.rs index 676fe6cbd5..a463fe136f 100644 --- a/src/bootstrap/src/utils/helpers/tests.rs +++ b/src/bootstrap/src/utils/helpers/tests.rs @@ -101,6 +101,8 @@ fn test_set_file_times_sanity_check() { #[test] fn test_submodule_path_of() { + // Debian: doesn't work in non-git context + return; let config = TestCtx::new().config("build").create_config(); let build = crate::Build::new(config.clone()); -- 2.30.2